<%@ page errorPage="/forward/error/page_error.jsp" %>
<%@ taglib uri="/WEB-INF/eam-tag.tld" prefix="eam" %>
<%@ page import="com.sbdcpn.page.utils.RequestUtil,
				com.sbdcpn.utils.tools.CommonFun,
				com.sbdcpn.utils.system.FunUtil" %>

<eam:PageLanguage />

<%
	String funcid = request.getParameter("funcid");
	String title = new String("title." + funcid);

	String funcIsTotal = RequestUtil.getStringParameter(request ,"funcIsTotal");

	//add by jason 2004-5-4
	String strPageType = RequestUtil.getStringParameter(request ,"pageType");
	if (strPageType.equals("")) strPageType = "grid";
	String strWhere = CommonFun.encodeURLParam(RequestUtil.getStringParameter(request ,"where_sql"));
	String strValue = RequestUtil.getStringParameter(request ,"where_value");
	String strType = RequestUtil.getStringParameter(request ,"where_type");
	String strExtendParam = RequestUtil.getStringParameter(request ,"extend_param");
	String strSelExtendParam = RequestUtil.getStringParameter(request ,"selextend_param");
	String strPkCol = FunUtil.getInstance().getElementByFunID(funcid ,"pk_col");

	String selOrgCols = RequestUtil.getStringParameter(request ,"selOrgCols");
	String selSrcCols = RequestUtil.getStringParameter(request ,"selSrcCols");
	String isMoreselect = RequestUtil.getStringParameter(request ,"isMoreselect");
	String isSetdefaultval = RequestUtil.getStringParameter(request ,"isSetdefaultval");

	String strOrgWhere = CommonFun.encodeURLParam(RequestUtil.getStringParameter(request ,"orgwhere_sql"));
	String strOrgValue = RequestUtil.getStringParameter(request ,"orgwhere_value");
	String strOrgType = RequestUtil.getStringParameter(request ,"orgwhere_type");
	//add by jason 2004-5-4

	if (!strOrgWhere.equals("")) {
		if (RequestUtil.getStringParameter(request ,"where_sql").equals("") || RequestUtil.getStringParameter(request ,"where_sql").equals("notDoQuery")) {
			strWhere = strOrgWhere;
			strValue = strOrgValue;
			strType = strOrgType;
		} else {
			strWhere += " AND " + strOrgWhere;

			if (!strOrgType.equals("")) {
				strValue += strOrgValue;
				strType += strOrgType;
			}
		}
	}

	String strLeftWidth = "160";
	String strnotDoQuery = "notDoQuery";
	String strSelOrgWhere = "" ,strSelOrgValue = "" ,strSelOrgType = "";
	if (strPageType.equals("check")) {
		strLeftWidth = "0";
		strnotDoQuery = strWhere;
	} else if (strPageType.equals("selgrid")) {
		System.out.println("selgrid------------------------------");
		strSelOrgWhere = "&orgwhere_sql=" + strWhere;
		strSelOrgValue = "&orgwhere_value=" + strValue;
		strSelOrgType = "&orgwhere_type=" + strType;
	}
%>
<html>
<head>
<title><eam:message key="<%=title%>"/>&nbsp&nbsp[<%=(String)userInfo.get("user_name")%>
&nbsp;&nbsp;<%=(String)userInfo.get("dept_name")%>]
</title>
</head>

<frameset cols="<%=strLeftWidth%>,*" rows="*" frameborder="yes" border="1" framespacing="1">
  <frame name="lefttree" id="lefttree" scrolling="yes" src="<%=CONTEXTPATH%>/layout/treeleft.jsp?funcid=<%=funcid%>&pageType=<%=strPageType%>&where_sql=<%=strWhere%>&where_value=<%=strValue%>&where_type=<%=strType%>&extend_param=<%=strExtendParam%>&selextend_param=<%=strSelExtendParam%>&selOrgCols=<%=selOrgCols%>&selSrcCols=<%=selSrcCols%>&isMoreselect=<%=isMoreselect%>&isSetdefaultval=<%=isSetdefaultval%>">
  <frame name="righttree" id="righttree" scrolling="yes" src="<%=CONTEXTPATH%>/pageJumpAction.do?funcid=<%=funcid%>&pageType=<%=strPageType%>&where_sql=<%=strnotDoQuery%>&where_value=&where_type=<%=strSelOrgWhere+strSelOrgValue+strSelOrgType%>&extend_param=<%=strExtendParam%>&treeParentid=&treeLevelcol=<%=strSelExtendParam%>&selOrgCols=<%=selOrgCols%>&selSrcCols=<%=selSrcCols%>&isMoreselect=<%=isMoreselect%>&isSetdefaultval=<%=isSetdefaultval%>&funcIsTotal=<%=funcIsTotal%>">
</frameset>
<noframes>
<body>
</body>
</noframes>
</html>